<?php
/********************************************************
 *
 * ļ:
 *		±
 *
 * @copyright Copyright (c) 2008-2009
 * @author  lcg635@126.com
 *
 ********************************************************/
defined('APP_DIR') or die('404 Not Found');

FLEA::loadClass('Common_Table');

class Table_Tshici extends Common_Table {
    var $tableName = 'main_shici';
    var $primaryKey = 'shici_id';

	function form($type, $data = null) {
		$this->_ui = FLEA::initWebControls();
		$form = array(
			'title' => $this->_ui->control('Textbox', 'title',
				array(
					'required' => 'true',
					'showName' => '文章标题'
				),
				true
			),
			'author' => $this->_ui->control('Textbox', 'author',
				array(
					'required' => 'true',
					'showName' => '作者'
				),
				true
			),

			'content' => $this->_ui->control('Fckeditor', 'content',
				array(
					'required' => 'true',
					'showName' => '内容'
				),
				true
			),

			'type' => $this->_ui->control('DropdownList', 'type',
				array(
					'required' => 'true',
					'selected' => -1,
					'items' => array(
						'' => -1,

						'诗' => 0,
						'词' => 1,
						'歌' => 2,
						'赋' => 3


					),
					'showName' => '类型'
				),
				true
			),
			'original' => $this->_ui->control('Checkbox', 'original',
				array(
					'value' => 1
				),
				true
			)
		);
		return $form;
	}
}

